<template>
	<view  class="setPadding setFontColor2">
		<navigationBar :titleName="'企业详情'"></navigationBar>
		<zero-loading v-if="loading" type="love" :mask="true"></zero-loading>
		<u-toast ref="uToast"></u-toast>
		<u-transition v-if="companyMsg.companyName" :show="true" mode="fade-down" duration="1000">

			<!-- 这里是企业信息 -->
			<view class="baseMsg ">
				<view class="msgBox  setVertical">
					<view class="setcolor2 setVerticalCenter">
						<text style="font-size: 65rpx;color:#19be6b;;" class="iconfont iconwodeqiye"></text>
						<text class="company">{{companyMsg.companyName}}</text>
					</view>
					<view class="setOnlyDisplay setMiniFont"  style="margin-bottom: 10rpx;" v-if="companyMsg.companyHistoryNames" >
						<text class="setNowrap1">曾用名：</text>
						<text class="setNowrap2 setVertical setwarp" >
							
								<text class="textLastName" v-for="(item,index) in companyMsg.companyHistoryNames" :key="index">{{item}}</text>
							
						</text>
						
					</view>
					
					<view class="tabTime setwarp sethorizontalbetween setVerticalCenter">
						<view class="tab textLayout setwarp ">
							<view class="tabBox setMarginVertical">
								<u-tag :text="companyMsg.companyIndustry" mode="light" size="mini" 
									type="success"></u-tag>
							</view>
							<view class="tabBox setMarginVertical">
								<u-tag :text="companyMsg.companyProvince" mode="light" size="mini" 
									type="success"></u-tag>
							</view>
							<view class="tabBox setMarginVertical">
								<u-tag :text="companyMsg.companyCity" mode="light" size="mini" 
									type="success"></u-tag>
							</view>
							<view class="tabBox setMarginVertical">
								<u-tag :text="companyMsg.companyRegStatus" mode="light" size="mini" 
									type="success"></u-tag>
							</view>
						</view>

					</view>

					<view class="textLayout sethorizontalbetween setVerticalCenter">

					</view>
					<view class="textLayout">

						<view class="textstyle">
							<text>注册资本：</text>
							<text>{{companyMsg.companyRegCapital}}</text>
						</view>
						<view class="">
							<text>企业法人：</text>
							<text>{{companyMsg.companyLegalPersonName}}</text>
						</view>
					</view>

					
					
					<view v-if="companyMsg.companyToTime&&$u.test.isEmpty(companyMsg.companyToTime)" class="textLayout">
						<view class="textstyle">
							<text>营业到期时间：</text>
							<text>{{companyMsg.companyToTime}}</text>
						</view>
					</view>
					<view class="textLayout">
						<view class="textstyle">
							<text>企业类型：</text>
							<text>{{companyMsg.companyType}}</text>
						</view>
					</view>
					<view class="textLayout">
						<view class="textstyle">
							<text>公司信用代码：</text>
							<text>{{companyMsg.companyCreditCode}}</text>
						</view>
					</view>
					
					<view class="textLayout">
						<view class="textstyle textLayout">
							<text class="setNowrap1">注册地区：</text>
							<text class="setNowrap2">{{companyMsg.companyRegLocation}}</text>
						</view>
					</view>
				</view>
				<view class=" setVerticalCenter " style="width: 100%;" >
					<view class="setVerticalCenter" style="width: 80%;">
						<view class="">
							<uni-icons type="location" size="30"></uni-icons>
						</view>
						<view class="setwarp">备案地：{{companyMsg.companyRegInstitute}}</view>
					</view>
					<view class=" setNowrap1 setDisplayCenter setMarginHorizontal" @click="callPhone(companyMsg.companyPhoneNum)"  style="height: 100rpx;line-height: 100rpx;">
						<view class="phone setDisplayCenter">
							<u-icon name="phone-fill"></u-icon>
							<text>电话</text>
						</view>
					</view>
				</view>
			</view>
		
			<!-- 企业发展 -->
			
			<view class="classType " >
				
				<view class="imgBox  msgBox" style="border-bottom: none;">
					<text class="fixedWidth company">企业发展：</text>
					<u-line color="#cccccc"></u-line>
					<!-- <view class="portrait setVerticalLayout ">
						<text>企业发展</text>
					</view> -->
					<view class="setVerticalCenter" @click="gridClick(0)">
						<view class="img setVertical setRadius">
							<text class="textColor" v-if="companyMsg.sumMoney">0~{{companyMsg.sumMoney}}万</text>
							<view class="imgStyle">
								<image src="../../static/images/find/three.png" mode=""></image>
							</view>
							<text>中标总金额</text>
						</view>
						<view class="img setVertical setRadius" >
							<div class="textColor" v-if="companyMsg.bidderAreaName" v-for="(item,index) in companyMsg.bidderAreaName" :key="index">
								<text v-if="index==0&&item">{{item}}</text>
								<text v-else-if="index==2&&item&&!companyMsg.bidderAreaName[0]">{{item}}</text>
							</div>
							<view class="imgStyle">
								<image src="../../static/images/find/pie.png"></image>
							</view>
									
							<text>常中标区域</text>
						</view>
						<view class="img setVertical setRadius">
							<text class="textColor"  v-if="companyMsg.maxMoney">{{companyMsg.maxMoney}}万</text>
							<view class="imgStyle">
								<image src="../../static/images/find/zhu.png" mode=""></image>
									
							</view>
							<text>最大中标金额</text>
						</view>
					</view>
				</view>
			</view>
			<view class="classType " v-if="companyMsg.companyBaseInfo">
				<view class="msgBox  setVertical natureBusine">
					<view class="setVertical  ">

						<text class="fixedWidth company">公司简介：</text>
						<u-line color="#cccccc"></u-line>
						<text  v-if="companyMsg.companyBaseInfoFlag">{{companyMsg.companyBaseInfo}}</text>
						
						<view v-else>
							
							<view v-if="companyMsg.companyBaseInfoCheck">
								<text>{{companyMsg.companyBaseInfo}}</text>

								<view  class="setcolor setDisplayCenter"
									@click="companyMsg.companyBaseInfoCheck=false">
									<uni-icons color="#19be6b" type="top" size="15"></uni-icons>收起
								</view>
							</view>
							<view v-else>
								<text>{{companyMsg.companyBaseInfo2}}</text>
								<text class="setcolor setDisplayCenter"
									@click="companyMsg.companyBaseInfoCheck=true">加载更多...</text>

							</view>

						</view>



					</view>
				</view>
			</view>
			<view class="classType" v-if="companyMsg.companyBusinessScope">
				<view class="msgBox  setVertical natureBusine">
					<view class="setVertical  ">
						<text class="fixedWidth company ">经营范围：</text>
						<u-line color="#cccccc"></u-line>
						<text v-if="companyMsg.companyBusinessScopeFlag">{{companyMsg.companyBusinessScope}}</text>
						<view v-else class="">
							<view v-if="companyMsg.companyBusinessScopeCheck">
								<text>{{companyMsg.companyBusinessScope}}</text>
								<view class="setcolor setDisplayCenter"
									@click="companyMsg.companyBusinessScopeCheck=false">
									<uni-icons color="#19be6b" type="top" size="15"></uni-icons>收起
								</view>
							
							</view>
							<view v-else>
								<text>{{companyMsg.companyBusinessScope2}}</text>
								<text class="setcolor setDisplayCenter"
									@click="companyMsg.companyBusinessScopeCheck=true">加载更多...</text>
							</view>
						</view>
					


					</view>


				</view>
			</view>
			
			<!-- 分类标注栏 -->
			<view class="classType ">
				<view class="msgBox  setVertical" style="border-bottom: none;padding-bottom: none;">
					<!-- 文字栏 -->
					<view class="company">
						<text>经营概况</text>
						<u-line color="#cccccc"></u-line>
					</view>
				</view>
				<view class="itemBox">
					<u-grid :border="true" :col="4">
						<u-grid-item @click="gridClick(index)" v-for="(item,index) in baseList" :key="index">
							<text :class="item.class" style="font-size: 50rpx;"></text>
							<!-- <u-icon :customStyle="{paddingTop:20+'rpx'}" name="clock"></u-icon> -->
							<text class="grid-text">{{item.title}}</text>

							<text class="setcolor" v-if="index==0">{{companyMsg.companyBiddingListSize}}条</text>
							<text class="setcolor"
								v-else-if="index==1">{{companyMsg.companyChangeRecordListSize}}条</text>
							<text class="setcolor" v-else-if="index==2">{{companyMsg.companyMainStuffListSize}}条</text>
							<text class="setcolor"
								v-else-if="index==3">{{companyMsg.companyRegisteredPersonnelDetailsListSize}}条</text>
							<text class="setcolor"
								v-else-if="index==4">{{companyMsg.companyQualificationDetailsListSize}}条</text>

							<text class="setcolor"
								v-else-if="index==5">{{companyMsg.companyProjectDetailsListSize}}条</text>
							<text class="setcolor" v-else-if="index==6">{{companyMsg.companyCreditRateListSize}}条</text>

							<text class="setcolor" v-else-if="index==7">{{companyMsg.companyInvestListSize}}条</text>


							<text class="setcolor" v-else>0条</text>
						</u-grid-item>
					</u-grid>

				</view>

			</view>
		</u-transition>
	</view>
</template>

<script src="./detailenterprise.js"></script>

<style lang="scss">
	@import "./detailenterprise.css";
</style>
